package com.sunk.ytmall.controller;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.sunk.ytmall.common.Result;
import com.sunk.ytmall.entity.Goods;
import com.sunk.ytmall.entity.Type;
import com.sunk.ytmall.entity.vo.ProductInfoVO;
import com.sunk.ytmall.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/type")
@Transactional
public class TypeController {

    @Autowired
    private ITypeService typeService;

    @RequestMapping("/getType")
    public Result getType(){
        Result result=new Result(true);
        List<Type> list=typeService.selectList(new EntityWrapper<Type>());
        result.setResult(list);
        return result;
    }
}
